package com.coderlin1.mapper;

import com.coderlin1.entities.Customer;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <Description> <br>
 *
 * @author Coder_Lin<br>
 * @version 1.0<br>
 * @taskId: <br>
 * @createDate 2021/07/30 9:44 <br>
 * @see com.coderlin1.mapper <br>
 */
public interface CustomerMapper {

    /**
     * 列出所有的customer
     * @return
     */
    List<Customer> listCustomer();

    /**
     * 添加用户
     * @param customer
     * @return
     */
    Integer addCustomer(@Param("customer") Customer customer);

    /**
     * 根据输入的文本进行模糊查询
     * @param custName
     * @return
     */
    List<Customer> searchCustomerByName(@Param("custName") String custName);

    /**
     * 根据id查询出用户信息
     * @param cid
     * @return
     */
    Customer listCustomerById(@Param("cid") Integer cid);

    /**
     * 修改客户数据
     * @param customer
     * @return
     */
    Integer modCustomer(@Param("customer") Customer customer);

    /**
     * 根据id删除客户信息
     * @param cid
     * @return
     */
    Integer delCustomer(@Param("cid") Integer cid);
}
